package org.example;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableConfigurationProperties(value=MyProp.class)
public class MyConfigrationalala {
    public MyConfigrationalala() {
        System.out.println("这个org.example.XXX工程");
    }

    @Bean
    public Student initStudent(MyProp myProp) {

        return new Student(myProp.getName(), myProp.getAge(), 0);
    }


}
